package com.acme.bankapp.domain.bank;

import com.acme.exceptions.NotEnoughFundsException;

public abstract class AbstractAccount implements Account {

	private int balance;
	
	public AbstractAccount(int balance) {
	    if (balance < 0) {
	        throw new IllegalArgumentException();
	    }
		this.balance = balance;
	}
	
	public int getBalance() {
		return this.balance;
	}
	
	protected void setBalance(int balance) {
		this.balance = balance;
	}

	public abstract void withdraw(int amount) throws NotEnoughFundsException;
	public abstract void deposit(int amount);
	
}
